<%@page import="Logic.MaxConcAppt_BLL"%>
<%@page import="Logic.Authorizer"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<% 
if(session.getAttribute("name") == null){response.sendRedirect("login.jsp");} 
else
{
	if(Authorizer.checkRole("1", session.getAttribute("role").toString()) || Authorizer.checkRole("3", session.getAttribute("role").toString()) || (session
			.getAttribute("role").equals("2")))
	{
		
	}
	else
		response.sendRedirect("nopermission.jsp");
}

String currentNum = MaxConcAppt_BLL.getCurrentNumber();
%> 

<!-- Declare the first header -->
<jsp:include page="t_header.jsp" />

<!-- Declare Breadcrumbs options -->
<!-- <div class="breadcrumbs_container">
	<article class="breadcrumbs">
	<a href="staffapp_main.jsp">Manage Staff Appointments</a> 
		<div class="breadcrumb_divider"></div>
		<a class="current">Set Max Concurrent Appointments</a>
	</article>
</div>  -->
<jsp:include page="header.html" />
<!-- Declare sidebar -->
<jsp:include page="t_sidebarappointment.jsp" />

<!-- Main Content -->
<body>
	<section id="main" class="column">
		
		<% 
		if (request.getParameter("error") != null)
		{
			if(request.getParameter("error").equals("1"))
				out.print("<h4 class='alert_error'>Error - Please enter an integer above 0.</h4>");
			else if (request.getParameter("error").equals("-1"))
				out.print("<h4 class='alert_info'>You have successfully updated the value.</h4>");
		}%>
		
				
		<div class="clear"></div>
		
		<article class="module width_half">
			<header><h3>Set Maximum Concurrent Appointments</h3></header>
			<form action="SetMaxConc" method="POST">
				<div class="module_content">
						<fieldset style="width:48%; float:left; margin-right: 3%;"> <!-- to make two field float next to one another, adjust values accordingly -->
							<label>Maximum</label>
							<input type="text" value="<%=currentNum %>" name="max" style="width:82%;">
						</fieldset>
						<div class="clear"></div>
				</div>
			<footer>
				<div class="submit_link">
					<input type="submit" value="Update Value" class="alt_btn">
				</div>
			</footer>
			</form>
		</article><!-- end of post new article -->

		
		<div class="spacer"></div>
	</section>

<!-- Declare closing tags -->
<jsp:include page="t_footer.jsp"/>